package com;
import java.util.Scanner;
public class Master {

    public void feed(int pet)
    {
        Scanner scan = new Scanner(System.in);
        Object dog = new Dog() {
            @Override
            public void food() {

            }

            @Override
            public void eat(int i) {

            }
        };
        Cat c = new Cat() {
            @Override
            public void food() {

            }

            @Override
            public void eat(int i) {

            }
        };
        if(pet==1)
        {
            System.out.print("喂骨头扣1，喂鱼扣2");
            if(scan.nextInt()==2)
            {
                c.eat(1);
            }
            else{
                c.eat(2);
            }
        }
    }
}
